feat(dashboards): add live activity dashboard widget#13
Open
lordspline wants to merge 5 commits into
Open
Conversation
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Dashboards do not have a compact first-party way to show what is happening right now. This product experiment adds a narrowly scoped live activity tile inspired by PostHog#62806 without introducing a separate analytics engine.
Changes
live_activitydashboard widget type to the backend registry, catalog, default layout, generated config schemas, frontend registry, and MCP generated surfaces.$lib, and target properties without per-row person lookups.How did you test this code?
As an agent, I ran:
hogli build:openapi && hogli build:widget-typeshogli test products/dashboards/backend/api/test/test_run_widgets.py products/dashboards/backend/api/test/test_dashboard_widgets.py products/dashboards/backend/api/test/test_widget_config_schema_parity.py products/dashboards/backend/test/test_widget_layouts.py products/dashboards/backend/widgets/test/test_live_activity_widget.py— 148 passedpnpm --filter=@posthog/frontend typescript:checkCLICKHOUSE_DATABASE=posthog: 3.35s locally, 4 active users, 5 events in window, seeded web/mobile/backend events visiblerun_widgetsrequests over 17s, simulateddocument.hidden=trueproduced 0 scheduled requests over 17s, and resume/manual refresh picked up delayed eventsAutomatic notifications
Docs update
No docs update for this experiment PR. The widget copy documents the fixed 5-minute window and hidden-tab pause behavior inline.
🤖 Agent context
Autonomy: Human-driven (agent-assisted)
Captain Capy implemented this PR from a human request, using the dashboard-widget management workflow and generated API/type tooling. Two deterministic visual directions were explored before implementation; the selected direction keeps the tile compact, uses existing dashboard widget/query infrastructure, and avoids high-frequency polling, unbounded payloads, and per-row requests.
The hidden-tab behavior was verified by simulating
document.hidden=truein Playwright because headed/headless browser tabs remained visible in this environment.Need help on this PR? Tag
/codesmithwith what you need. Autofix is disabled.